import { lazy ,Suspense} from "react"
import Loading from "../component/Loading/Loading"
let MyResident = lazy(() => import("../view/Index/Resident/Resident"))
let AddResident = lazy(() => import("../view/Index/Resident/AddResident/AddResident"))
let ResidentDetail = lazy(() => import("../view/Index/Resident/ResidentDetail/ResidentDetail"))
let PerfectDatas = lazy(() => import("../view/Index/Resident/Perfect/PerfectDatas"))
let Resident: any = [
    {
        path: "/index/resident",
        element: <Suspense fallback={<Loading/>}><MyResident /></Suspense>
    },
    {
        path: "/index/residentdetail",
        element: <Suspense fallback={<Loading/>}><ResidentDetail /></Suspense>
    },
    {
        path: "/index/addresident",
        element:<Suspense fallback={<Loading/>}> <AddResident /></Suspense>
    },
    {
        path: "/index/perfectdatas",
        element:<Suspense fallback={<Loading/>}> <PerfectDatas /></Suspense>
    }
]
export default Resident